package com.jerry.template.module.mianpage.shouye.recommend.home.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.jerry.template.base.BaseFragment;
import com.jerry.template.module.mianpage.shouye.recommend.home.fragment.UserDetailFragment;
import com.jerry.template.module.mianpage.shouye.recommend.home.fragment.UserViewPagerFragment;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 16-5-13.
 */
public class UserFragmentVpAdapter extends FragmentPagerAdapter{
    private String[]title={"投稿","收藏","评论"};
    private String user_id;

    public UserFragmentVpAdapter(FragmentManager fm, String user_id) {
        super(fm);
        this.user_id=user_id;

    }

    @Override
    public Fragment getItem(int position) {
        Map<String,String>params  =new HashMap<>();
        params.put("user_id",user_id);
        return BaseFragment.newInstance(UserViewPagerFragment.class,params);
    }

    @Override
    public int getCount() {
        return 3;
    }
    @Override
    public CharSequence getPageTitle(int position) {
        return title[position];
    }
}
